<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="./layui/css/layui.css">
</head>
<body>
  <button class="layui-btn layui-btn-danger">按钮</button>
  <div class="layui-container">
    <div class="layui-row">
      <div class="layui-col-md6">dwdwdw</div>
      <div class="layui-col-md6">dwdwdw</div>
      <div class="layui-col-md6">dwdwdw</div>
      <div class="layui-col-md6">dwdwdw</div>
    </div>
  </div>
  <div id="rate"></div>
  <script src="./layui/layui.js"></script>
  <script>
    // 使用什么模块就引入什么模块
    layui.use(['rate', 'jquery'], function(){
      var rate = layui.rate;
      var $ = layui.jquery;


      rate.render({
        elem: "#rate",
        value: 4,
        choose: function(value){
          console.log(value,1111);
        }
      })
    })
  </script>
</body>
</html>